package com.ytjj.qmyx.admin.service.impl;

import com.github.pagehelper.PageHelper;
import com.ytjj.common.api.CommonPage;
import com.ytjj.qmyx.admin.dao.BankerProductDao;
import com.ytjj.qmyx.admin.dao.BankerProductSpecDao;
import com.ytjj.qmyx.admin.model.request.BankerProductRequest;
import com.ytjj.qmyx.admin.service.BankerProductSpecService;
import com.ytjj.qmyx.mall.model.BankerProductSpec;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 * 
 * @Version: 1.0
 */
@Service
public class BankerProductSpecServiceImpl implements BankerProductSpecService {

    @Autowired
    private BankerProductSpecDao bankerProductSpecDao;

    @Override
    public CommonPage<BankerProductSpec> getSpecList(BankerProductRequest bankerProductRequest) {
        PageHelper.startPage(bankerProductRequest.getPageNum(), bankerProductRequest.getPageSize());
        List<BankerProductSpec> pageList = bankerProductSpecDao.getSpecList(bankerProductRequest.getProductId());
        return CommonPage.restPage(pageList);
    }
}
